<?php
/**
 * Class for append data into a log file
 */
class LogFile{
	public $the_file;

	public function __construct(){
	}

        public function connect($the_file){
			$this->file = $the_file;
	}

	public function write($the_string){
		if( $fh = @fopen( $this->file, 'a+')){
			fwrite($fh, date('Ymd-h:i:s'). " - $the_string\n");
			fclose($fh);
			return true;
		}
		else{
			return false;
		}
	}
}
$logF = new LogFile;
?>